package main

import (
	"context"
	rentalpb "coolcar/proto/rental_out/v1"
	"fmt"
	"log"

	"google.golang.org/grpc"
)

func main() {
	log.SetFlags(log.Lshortfile)
	conn, err := grpc.Dial(":50922", grpc.WithInsecure())
	if err != nil {
		log.Fatalf("connect err: %v \n", err)
	}

	client := rentalpb.NewTripServiceClient(conn)

	res, err := client.GetTrip(context.Background(), &rentalpb.GetTripRequest{
		Id: "1233333",
	})

	if err != nil {
		log.Fatalf("can not getTrip: %v \n", err)
	}

	fmt.Println("res", res)
}
